package com.bite.aop.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@Aspect
public class AspectDemo1 {
    @Pointcut("execution(* com.bite.aop.controller.*.*(..))")
    public void pt(){}

    @Around("pt()")
    public Object doAround(ProceedingJoinPoint pjp){
        try {
            Object result = pjp.proceed();
        }catch (Throwable throwable){

        }

        return result;
    }
}
